/*
 * GraphicContext.cpp
 */
#include "GraphicContext.h"

namespace gui
  {
    GraphicContext::GraphicContext()
      {
        _mode = DRAW_MODE_SOLID;
        _color = 0x0;
        _alpha = 0xff;
      }

    void GraphicContext::activate() const
      {
        drawing_mode(_mode, NULL, 0, 0);
        set_trans_blender(255, 255, 255, _alpha);
      }

    int GraphicContext::mode() { return _mode; }
    int GraphicContext::mode(int mode) { return _mode = mode; }

    int GraphicContext::color() { return _color; }
    int GraphicContext::color(int color) { return _color = color; }

    int GraphicContext::alpha() { return _alpha; }
    int GraphicContext::alpha(int alpha) { return _alpha = alpha; }
  }
